package com.xiaoxin.yixinai.userinfo;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;

import com.xiaoxin.yixinai._frame.base.BaseModel;

/**
 * manage-admin项目中的人员类
 * @author 李立泼
 *
 */
@Entity
@Table(name="tb_user_info")
public class UserInfo extends BaseModel {

	/**
	 * 主键
	 */
	@Id
	@Column(name="user_id")
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	private Integer userId;
	
	/**
	 * 公司ID
	 */
	@Column(name="company_id")
	private Integer companyId;
	
	/**
	 * 是否删除(0:未删除,1:已删除)
	 */
	@Column(name="is_delete")
	private Integer isDelete;
	
	/**
	 * 登录名
	 */
	@Column(name="login_name")
	private String loginName;
	
	/**
	 * 登录密码
	 */
	@Column(name="login_pass")
	private String loginPass;
	
	/**
	 * 联系电话
	 */
	@Column(name="phone")
	private String phone;
	
	/**
	 * 注册时间
	 */
	@Column(name="register_time")
	private Date registerTime;
	
	/**
	 * 姓名
	 */
	@Column(name="user_name")
	private String userName;
	
	/**
	 * 用户状态,是否允许登陆(0:允许, 1:否)
	 */
	@Column(name="user_state")
	private Integer userState;
	
	/**
	 * 是否为系统默认用户(0:默认用户 不允许维护权限及删除,  1:配置用户)
	 */
	@Column(name="is_default")
    private Integer isDefault;
	
	/**
	 * 创建时间
	 */
	@Column(name="create_time")
	private Date createTime;
	
	/**
	 * 最后修改时间
	 */
	@Column(name="last_update_time")
	private Date lastUpdateTime;
	
//	@Column(name="oem_id")
//	private Integer oemId;
	
	/**
	 * 是否隐藏号码(0:不隐藏,1:隐藏)
	 */
	@Column(name="hide_phone")
	private Integer hidePhone;
	
	/**
	 * 公司时开户时，管理员才设置值
	 */
	@Column(name="role")
	private Integer roleId;
	
	@Column(name="group_id")
	private Integer groupId;
	
	@Column(name="partition_companyid")
	private Integer partitionCompanyid;
	
	@Column(name="is_fork_group")
	private Integer isForkGroup;
	
    /**
     * 权限控制(JSON -> {"authorities" : ["TASK_CREATE", "TASK_EXPORT", "TASK_BATCH_EXPORT", "TASK_RE_CREATE"]} )
     */
    @Column(name="authority_control")
    private String authorityControl;

	/**
	 * 邀请人（对应本表主键）
	 */
	@Column(name = "inviter_id")
    private Integer inviterId;

	/**
	 * 我的邀请码
	 */
	@Column(name = "my_inviter_code")
	private String myInviterCode;
	
	/**
	 * 排序
	 */
	@Column(name = "order_index")
	private Integer orderIndex;
	

	public Integer getUserId() {
		return userId;
	}

	public void setUserId(Integer userId) {
		this.userId = userId;
	}

	public Integer getCompanyId() {
		return companyId;
	}

	public void setCompanyId(Integer companyId) {
		this.companyId = companyId;
	}

	public Integer getIsDelete() {
		return isDelete;
	}

	public void setIsDelete(Integer isDelete) {
		this.isDelete = isDelete;
	}

	public String getLoginName() {
		return loginName;
	}

	public void setLoginName(String loginName) {
		this.loginName = loginName;
	}

	public String getLoginPass() {
		return loginPass;
	}

	public void setLoginPass(String loginPass) {
		this.loginPass = loginPass;
	}

	public String getPhone() {
		return phone;
	}

	public void setPhone(String phone) {
		this.phone = phone;
	}

	public Date getRegisterTime() {
		return registerTime;
	}

	public void setRegisterTime(Date registerTime) {
		this.registerTime = registerTime;
	}

	public String getUserName() {
		return userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

	public Integer getUserState() {
		return userState;
	}

	public void setUserState(Integer userState) {
		this.userState = userState;
	}

	public Integer getIsDefault() {
		return isDefault;
	}

	public void setIsDefault(Integer isDefault) {
		this.isDefault = isDefault;
	}

	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public Date getLastUpdateTime() {
		return lastUpdateTime;
	}

	public void setLastUpdateTime(Date lastUpdateTime) {
		this.lastUpdateTime = lastUpdateTime;
	}

	public Integer getHidePhone() {
		return hidePhone;
	}

	public void setHidePhone(Integer hidePhone) {
		this.hidePhone = hidePhone;
	}

	public Integer getRoleId() {
		return roleId;
	}

	public void setRoleId(Integer roleId) {
		this.roleId = roleId;
	}

	public Integer getGroupId() {
		return groupId;
	}

	public void setGroupId(Integer groupId) {
		this.groupId = groupId;
	}

	public Integer getPartitionCompanyid() {
		return partitionCompanyid;
	}

	public void setPartitionCompanyid(Integer partitionCompanyid) {
		this.partitionCompanyid = partitionCompanyid;
	}

	public Integer getIsForkGroup() {
		return isForkGroup;
	}

	public void setIsForkGroup(Integer isForkGroup) {
		this.isForkGroup = isForkGroup;
	}
	
	public String getAuthorityControl() {
		return authorityControl;
	}

	public void setAuthorityControl(String authorityControl) {
		this.authorityControl = authorityControl;
	}

	public Integer getInviterId() {
		return inviterId;
	}

	public void setInviterId(Integer inviterId) {
		this.inviterId = inviterId;
	}

	public String getMyInviterCode() {
		return myInviterCode;
	}

	public void setMyInviterCode(String myInviterCode) {
		this.myInviterCode = myInviterCode;
	}
	
}
